<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "google_authenticator".
 *
 * @property integer $id
 * @property integer $user_id
 * @property string $google_secret
 * @property string $last_google_code
 */
class GoogleAuthenticator extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%google_authenticator}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'user_id'], 'integer'],
            [['google_secret'], 'string', 'max' => 16],
            [['last_google_code'], 'string', 'max' =>6],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'user_id' => '用户id',
            'google_secret' => 'google秘钥',
            'last_google_code' => '最后一次使用的验证码',
        ];
    }
}
